package com.zjy.dao;

import com.zjy.bean.Goods;
import com.zjy.dto.GoodsParam;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface GoodsMapper extends Mapper<Goods> {
    int deleteGoodsById(String goodsId);

    Goods selectGoodsById(String goodsId);

    List<Goods> selectGoodsList(GoodsParam param);

    int getGoodsCount(GoodsParam param);

    int getLowStockCount();

    int updateCollectionNum(@Param("goodsId") String goodsId,@Param("count") int count);

    List<Goods> getGoodsCollection(GoodsParam param);

    int getGoodsCollectionCount(GoodsParam param);

    Goods getLimitDiscount();

    List<Goods> getEightRecommend();

    int updateCommentNumByGoodsId(@Param("goodsId") String goodsId, @Param("count") int count);

    Goods selectGoodsByCommentId(String commentId);
}